# 创建一个空集合
my_set = set()

# 添加元素
my_set.add(1)
my_set.add(2)
my_set.add(3)

# 输出集合
print("添加元素后的集合：", my_set)

# 删除元素
my_set.remove(2)

# 输出集合
print("删除元素后的集合：", my_set)

# 求交集
another_set = {2, 3, 4, 5}
intersection = my_set.intersection(another_set)

# 输出交集
print("交集：", intersection)

# 求并集
union = my_set.union(another_set)

# 输出并集
print("并集：", union)

# 求差集
difference = my_set.difference(another_set)

# 输出差集
print("差集：", difference)

# 求对称差集
symmetric_difference = my_set.symmetric_difference(another_set)

# 输出对称差集
print("对称差集：", symmetric_difference)

# 判断元素是否存在
print("判断元素是否存在：", 2 in my_set)
